perm filename 4[00,BGB]2 blob
sn#047823 filedate 1973-06-07 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00010 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 ~F8IV. USING TVFONT - draft.
C00005 00003 ~F8TVFONT PRIMER - (draft).
C00012 00004 ~F8Polygon Killing.
C00015 00005 ~F8TVFONT COMMAND SUMMARY
C00019 00006 ~F8TVFONT COMMAND SUMMARY
C00021 00007 ~F8TVFONT COMMAND SUMMARY
C00023 00008 ~F8TVFONT'S EXTENDED COMMANDS.
C00025 00009 ~F8TVFONT'S EXTENDED COMMANDS.
C00028 00010 ~F8TVFONT NODE FORMATS - JAN 1973.
C00031 ENDMK
C⊗;
~F8IV. USING TVFONT - draft.
Introduction.
TVFONT is a version of CRE (January 1973) that was
specialized to the task of converting television images into type
fonts for the XGP, Xerox Graphics Printer. The original idea was to
demonstrate the utility of a polygon representation for scaling,
smoothing and editing typographical glyphs; the resulting hack
(demonstration program) was extended and developed by Tovar Mock
into the program called TVFONT. Accordingly, the main idea of TVFONT
is to convert video rasters into polygons, to edit and scale the
polygons, and to convert the polygons back into bit rasters.
The figure on page 41 is an example of expanding and
contracting a font without manual touching up. The top sample is the
original (BDR40 from CMU). The remainder have been generated by
TVFONT. The expansion or contraction was done by converting fonts
from bit matrices into a polygonal representation, multiplying by
the appropriate constant and reconverting back into a bit
representation. The following paragraph is an example of a font made
from television pictures:
This section IV, will be available as a TVFONT user manual
in another six months; it is presented here to give the would be
user a start, and the general reader a sample of the design and
extent of TVFONT.
~I1973,800;F8- 42 -
~F8TVFONT PRIMER - (draft).
TVFONT is on the system, and can be run by typing "R TVFONT"
at a III display console. At present, III #23 is next to a camera
setup for making fonts. The process of making a new XGP font or
altering an old one will be explained in six steps:
1. Raster input: get a video image or an old font.
2. Contouring: make polygons.
3. Polygon editing: delete, scale, position and alter.
4. Polygon I/O: save and restore polygons.
5. Font output: make new font and output font file.
Complexity arises in that there is more than one way to do
each step, there are default arguments and switchs which the user
may alter, there are ways to save and restore intermediate results,
and there are quite a few different display modes and display
diagonostics. The TVFONT command scanner resembles that of TVED and
E; (as well as CRE and GEOMED); the command scanner types an
asterisk "*" when it is in its top most listen loop waiting for a
single command character. The command character may be modified by
the META and CONTROL keys which will be abbreviated as "α", "β" and
"ε" for CONTROL, META, and META-CONTROL respectively. Many commands
in turn require arguments such as numbers or file names. Finally the
"X" command waits for an extended command name of several
characters, which is called an extended command.
This first explanation will present a way of making a new
font using the fewest commands.
Raster Input and Contouring:
1. "T" take television picture.
2. "H" Display histogram of television picture.
3. "C24" Cut at intensity level 24.
Get the Font Camera looking at a single letter in a font
book. Use a black piece of paper with a square cut out as a mask to
isolate the letter. The "T" command will take a television picture.
The "H" command will display a histogram of the television picture,
showing how many points of the image were 0 intensity, (total black)
and how many points of the image were 77 intensity, (total white). A
picture of a black glyph on a white background surrounded by a black
mask should yield a histogram with two peaks.
Next the "C" command followed by an octal number followed by
a carriage return; contours the image at the given octal intensity
cut threshold. That is all the points of the image above the
threshold are inside of a polygon. The intensity value of the
lowest valley between the two peaks of the histogram is probably the
best cut value (and is probably the octal number 24 or 30). The cut
command, will display the polygons that are made.
~I1973,800;F8- 43 -
~F8Polygon Killing.
4. "ε+" Fetch 1st polygon of 1stimage of the film.
5. "K" Kill a polygon.
6. "." ring around the polygons of an image.
7. "!" flush node display.
Given an image of polygons corresponding to one letter,
undesired polygons can be deleted by using the "K" command and the
node link display commands. To start, the "ε+" will intensify the
first polygon of the image's polygon ring; from there the "."
commands will intensify the next polygon of the ring; the "K"
command will delete the presently intensified polygon and fetch the
next polygon.
A font corresponds to a film. An image corresponds to a
letter. After taking a series of iaages, and deleting undesired
polygons a font file can be made using:
Making and Outputing a Font File.
8. "X"CENTER Center all the images of the film.
9. "Q" Make font bit rasters.
10. "εO" Output font file.
The "X"CENTER command is an extend mode command and requires
both hitting "X" and typing out the word "CENTER" followed by a
carriage return. The "Q" will cause a bit raster to be made for the
interior portions of each image of the film; if an image node does
not have an associate ASCII code then the user will be requested to
supply one. The "εO" will ask for a font filename and will output a
font file in the Stanford Format.
Testing a new Font File.
11. .XGP FILE/FONT=NEWFNT.FNT[XGP,BGB]
The above monitor command will print a FILE with a new font.
The user must specify his PPPN because the default is [XGP,SYS].
~I1973,800;F8- 44 -
~F8TVFONT COMMAND SUMMARY
A ASSIGN ASCII CODE TO IMAGE.
B EXPAND/CONTRACT BY CONSTANT
αB EXPAND/CONTRACT IN Y DIRECTION
βB EXPAND/CONTRACT IN X DIRECTION
εB SLANT CHARACTER (1/2 SLANTS TO 45 DEGREE ANGLE)
C MAKE THRESHOLD CUT.
εC MAKE POLYGON IMAGE OUT OF BIT REPRESENTATION OF FONT.
D ENkzZ&n∩2∃α$*2⊗RLz9α>2α
ε
JαB>2L:>:MαB∩⊗~
*2QαM→α>~2I84)∧0&2>≤
R∃αt*εJ⊗≥!αB>LrQ141αVN*α2&≡E!αB⊗ph)α≤Lb⊗Z⊗bα>→α≤zJJ⊗≥α>:∩Lr≥α∞D
Jε∞$*Iα∞|"∀4(hQα &DJNR>=∩ε51α⊂
! αaλ∞!∩α
%6lz∩ε1∧~VQ8hQα$&LrBVQ¬"YαBL~RVJ*α~J>jα∩&NZp4(
HJ&:B-!α∞J*α~&2(h)α,LZ&21∧J6ε≡*aαB>eJ≡>9∧zIαZ-∩R⊗`hQα0&≤B>]αd
NQα∀JQα&l
≡∀4Ph(
0M~">]∧~"εJ~R⊗I∧2J>5∧2>:Q∧J9α~u"N⊗≤hQα4&lzZ∃α∧z2f≡|qαR=∧r⊗bQ∧J6ε≡*p4(
hJ6>Z*αR=αt*]α&l
≡∀4P~4&6L"B>&u!α2&t(4(~hJ6V::α>:Rzα≡J&"αB>&u!↓"ε~αN⊗⊗rα&95I$4(hQα8&t*bQαLjε≡∀hP
8&¬∩⊗Z&⎇*Mα&l
≡∀4P~8&J-α⊗εQ∧r⊗bQ∧J6ε≡*αV:RLaα¬α≤BεJε≥"⊗IαM→αRf∧*⊂4(4p&J⊗∧*εQα¬∩⊗Z&⎇*Mα&l
≡∃α,rR&1∧ α∞"
∩ε∞R-⊃α&M¬"fB⊗ h(4(TIEe]~aaAA\1a5↓#)↓44P↓⊗'↑~F8TVFONT COMMAND SUMMARY
O OUTPUT CAREYE FILE.
αO OUTPUT CRE FILE
εO OUTPUT FONT FILE
P PLOT OUTPUT FILE.
Q MAKE FONT
αQ MAKE 1/2 SIZE FONT
R DISPLAY BIT MATRIX FOR THIS CHARACTER.
αR ROTATE IMAGE, LEVEL OR POLYGON (ANGLE IN RADIANS)
S SMOOTH
αS SMOOTH AND KILL VIDEO INTENSITY CONTOUR
βS REPEAT 'S' FOR EACH IMAGE
εS REPEAT 'αS' FOR EACH IMAGE
T TAKE A TV PICTURE
αT TAKE A TV PICTURE, SETTING CLIP LEVELS AUTOMATICALLY
V CREATE VERTEX AT CENTER
αV CREATE NEW VERTEX AT CURRENT VERTEX
βV CREATE NEW VERTEX IN NEW IMAGE
W CENTER IN THE WINDOW.
αW CENTER Y-POSITION ONLY.
βW CENTER X-POSITION ONLY.
εW MOVE POINT SPECIFIED BY LIGHT PEN TO CENTER.
X XTEND MODE COMMANDS
Y DISPLAY SMOOTHED FORM
βY DISPLAY VIDEO INTENSITY CONTOUR
αY DISPLAY BOTH OF ABOVE
εY DISPLAY VIDEO INTENSITY CONTOUR MUNGED ONTO PIXELS
Z NO-OP
αZ RESET LOGICAL CAMERA POSITION
βZ RESET DISPLAY
~I1973,800;F8- 46 -
~F8TVFONT COMMAND SUMMARY
+ Fetch film node.
α+ Fetch first image node from film.
β+ Fetch first level from film.
ε+ Fetch first polygon from film.
IF A NODE IS CURRENTLY BEING DISPLAYED, THESE COMMANDS AFFECT THAT NODE,
OTHERWISE THEY AFFECT THE CAMERA (VIEWERS) POSITION. <CONTROL> MULTIPLIES
BY 2, <META> MULTIPLIES BY 4.
; MOVE LEFT (←) BY DELTA
: MOVE RIGHT (→) BY DELTA
( MOVE UP BY DELTA
) MOVE DOWN BY DELTA
/ DIVIDE DELTA BY 2
\ MULTIPLY DELTA BY 2
THESE COMMANDS AFFECT THE CAMERA (VIEWERS) POSITION.
* INCREASE MAGNIFICATION BY DELTA
- DECREASE MAGNIFICATION BY DELTA
THESE COMMANDS CHANGE NODE BEING DISPLAYED.
. FETCH COUNTER CLOCKWISE NODE IN RING.
, FETCH CLOCKWISE NODE IN RING.
< FETCH FATHER OF NODE
> FETCH SON OF NODE
≤ FETCH ARC [OF POLYGON OR VERTEX]
→ FETCH POLYGON [OF VERTEX]
∧ EQUIVALENT TO '<,>'
∨ EQUIVALENT TO '<.>'
! FLUSH NODE DISPLAY
THESE COMMANDS AFFECT THE PUSHDOWN LIST
∪ PUSH NODE BEING DISPLAYED ONTO STACK
∩ POP NODE OFF STACK AND DISPLAY IT
↔ SWAP NODE BEING DISPLAYED WITH TOP OF STACK
~I1973,800;F8- 47 -
~F8TVFONT'S EXTENDED COMMANDS.
ARCWID
Set smoothing constant. This is the maximum distance a vertex
may from a arc before it is split into two arcs. See description
of smoothing algorithm on page XX.
BABYKILL
Toggle flag which causes baby polygons (those consisting of only
one pixel) to be killed)
CAMERA
Select a different camera number.
CENTER
Center all images. It is equivalent to the command 'W' applied
to each image and uses the same control bits.
DDT
Invoke DDT if present, return with αP..
DISPLAY
Enable display.
-DISPLAY
Disable display. TVFONT spends a significant amount of time
putting up the display.
EXIT
Exit to moniter.
GRID
Enable display of grid. Grid is some multiple of pixel size,
dependent on camera focal length. It is useful of lining up
characters.
-GRID
Disable display of grid.
HELP
Display help file.
HOLE
Change a polygon into a hole.
KILARC
Kill arcs vectors. This allows several degrees of smoothing to
be tried in conjunction with the ARCWID command.
~I1973,800;F8- 48 -
~F8TVFONT'S EXTENDED COMMANDS.
KILVIC
Kill video intensity contours and replaces them with arcs.
MUNG
Force all vertices of current polygon or level onto pixel boundaries.
This has a permanent effect as opposed to 'εY' command which only
displays them that way.
ORTHMUNG
ORTHMUNG forces vertices which appear to be form right angles onto
pixel boundaries. This is attempt to counter the rounding effect
of dekinking on sharp corners as are generated by reading a font.
POLYGON
Change a hole into a polygon
POPJ
Leave TTY loop. Used for debugging.
READFONT
Convert font which has been read into the font segment into polygonal
representation, displaying each character as read.
SCALE
Scale all images by constant. Equivalent to the command 'B' applied
to each image.
SLANT
Slant all images by constant . Please see command 'εB' for a more
complete description.
SORT
Sort images on film according to ASCII code. This is for convienence
in looking a fonts sequentially. The 'G' command is recommended for
finding specific characters.
XEROX
OUTPUT TV IMAGE TO XGP
XSCALE
Scale all images by constant in the X direction. Equivalent to the
command 'αB' applied to each image.
YSCALE
Scale all images by constant in the Y direction. Equivalent to the
command 'βB' applied to each image.
~I1973,800;F8- 49 -
~F8TVFONT NODE FORMATS - JAN 1973.
________________________________________________________________
| |
| VERTEX/ARC NODE. POLYGON/REGION NODE. |
| |
| 0 VERTEX-RING 0 POLYGON-RING. |
| 1 ROW,,COL 1 DAD,,SON |
| 2 TYPE,,RELOC 2 TYPE,,RELOC |
| 3 - ,, - 3 - ,, - |
| 4 ARC,, - 4 ARC,,NCNT |
| 5 - ,,PGON 5 - ,,PGON |
| 6 RT SEG,,LT SEG 6 - ,, - |
|________________________________________________________________|
| |
| IMAGE NODE. LEVEL NODE. |
| |
| 0 IMAGE-RING 0 LEVEL-RING |
| 1 - ,,SON 1 - ,,SON |
| 2 TYPE,,RELOC 2 TYPE,,RELOC |
| 3 - ,, - 3 - ,, - |
| 4 - ,, - 4 - ,,NCNT |
| 5 - ,, - 5 - ,, - |
| 6 - ,, - 6 - ,, - |
|________________________________________________________________|
| |
| FILM NODE. EMPTY NODE. |
| |
| 0 CORESIZE 0 - ,,AVAIL |
| 1 - ,,SON 1 - ,, - |
| 2 TYPE,,RELOC 2 TYPE,,RELOC |
| 3 - ,,AVAIL 3 - ,, - |
| 4 BLOCK COUNT 4 - ,, - |
| 5 - ,, - 5 - ,, - |
| 6 - ,, - 6 - ,, - |
|________________________________________________________________|
| |
| SEGMENT NODE. |
| 0 SEGMENT RING |
| 1 - ,, - |
| 2 TYPE,,300003 |
| 3 LDEL,,RDEL |
| 4 LCOL,,RCOL |
| 5 LROW,,RROW |
| 6 LT,,RT |
|________________________________________________________________|
~I1973,800;F8- 50 -